package edu.ar.bases.dvdstore.domainmodel.repositories;

import java.util.Collection;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import edu.ar.bases.dvdstore.domainmodel.entities.Factura;
import edu.ar.bases.dvdstore.domainmodel.repositories.interfaces.IFacturaRepository;


public class FacturaRepository extends HibernateDaoSupport implements IFacturaRepository {
	
	public FacturaRepository() {
		super();
	}

	
	
	public Collection<Factura> findAll()
	{
		return this.getHibernateTemplate().loadAll(Factura.class);
	}

	
	public void save(Factura entity)
	{
		this.getHibernateTemplate().save(entity);
	}
	
	
	public Factura findById(Integer facturaID)
	{
		return (Factura)this.getHibernateTemplate().get(Factura.class, facturaID);
	}
}
